//
//  NotificationAC.m
//  IOSLearn
//
//  Created by Yanyan Jiang on 2019/3/2.
//  Copyright © 2019 Yanyan Jiang. All rights reserved.
//

#import "NotificationAC.h"
#import "NotificationBC.h"

/**导航高度*/
#define SafeAreaTopHeight ((kScreenHeight == 812.0 ||kScreenHeight == 896.0) ? 88 : 64)
/**底部宏*/
#define SafeAreaBottomHeight ((kScreenHeight == 812.0 ||kScreenHeight == 896.0)  ? 34 : 0)

@interface NotificationAC ()
@property(nonatomic, strong) NotificationBC *bCC;
@end

@implementation NotificationAC
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"AAAAA";
    _bCC = [[NotificationBC alloc] init];
    _bCC.view.backgroundColor = [UIColor whiteColor];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(listenerTodo:) name:nil object:nil];
}

- (void)listenerTodo:(NSNotification *)info{
//    NSLog(@"notificationA:%@",info.name);
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self.navigationController pushViewController:_bCC animated:YES];
}

- (void)dealloc {
    // 移除当前Controller中的所有观察者
//    [[NSNotificationCenter defaultCenter] removeObserver:self];
    // 移除当前Controller中名字为postCenter的观察者
    [[NSNotificationCenter defaultCenter] removeObserver:self name:@"postCenter" object:nil];
}



@end
